#include "MoistureMeterComSettingDialog.h"
#include "ui_MoistureMeterComSettingDialog.h"

MoistureMeterComSettingDialog::MoistureMeterComSettingDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MoistureMeterComSettingDialog)
{
    ui->setupUi(this);
    connect(ui->pushButtonOK,&QAbstractButton::clicked,this,&MoistureMeterComSettingDialog::accept);
    connect(ui->pushButtonCancel,&QAbstractButton::clicked,this,&MoistureMeterComSettingDialog::reject);
}

MoistureMeterComSettingDialog::~MoistureMeterComSettingDialog()
{
    delete ui;
}

QString MoistureMeterComSettingDialog::getPortName() const
{
    return ui->widget->getPortName();
}

void MoistureMeterComSettingDialog::setBaudRate(QSerialPort::BaudRate v)
{
    ui->widget->setBaudRate(v);
}

QSerialPort::BaudRate MoistureMeterComSettingDialog::getBaudRate() const
{
    return ui->widget->getBaudRate();
}

void MoistureMeterComSettingDialog::setParity(QSerialPort::Parity v)
{
    ui->widget->setParity(v);
}

QSerialPort::Parity MoistureMeterComSettingDialog::getParity() const
{
    return ui->widget->getParity();
}

void MoistureMeterComSettingDialog::setDataBits(QSerialPort::DataBits v)
{
    ui->widget->setDataBits(v);
}

QSerialPort::DataBits MoistureMeterComSettingDialog::getDataBits() const
{
    return ui->widget->getDataBits();
}

void MoistureMeterComSettingDialog::setStopBits(QSerialPort::StopBits v)
{
    ui->widget->setStopBits(v);
}

QSerialPort::StopBits MoistureMeterComSettingDialog::getStopBits() const
{
    return ui->widget->getStopBits();
}
